/**
 * Created by BIYY on 2018-6-25.
 */

//import config from '../../config/index';
import inject from './inject/index';
import intercept from './intercept/index';

let api:any = {
    requestType: {
        get: 'get',
        post: 'post',
        put: 'put',
        delete: 'delete',
        jsonp: 'jsonp'
    }
};
let baseUrl = '/';
// 注册
api.register = {
    url: `${baseUrl}api/register`,
    method: api.requestType.post,
    intercept: intercept
};
//登陆
api.login = {
    url: `${baseUrl}api/login`,
    method: api.requestType.post,
    form: true,
    intercept: intercept
};
//登出
api.login_out = {
    url: `${baseUrl}api/life/loginOut`,
    method: api.requestType.post,
    intercept: intercept
};

//修改个人信息
api.edit = {
    url: `${baseUrl}api/edit`,
    method: api.requestType.post,
    form: true,
    inject: inject,
    intercept: intercept
};
//提交手机号
api.to_phone = {
    url: `${baseUrl}api/toPhone`,
    method: api.requestType.post,
    form: true,
    inject: inject,
    intercept: intercept
};
//提交验证码
api.to_msg_code = {
    url: `${baseUrl}api/toMsgCode`,
    method: api.requestType.post,
    form: true,
    inject: inject,
    intercept: intercept
};
//提交列表
api.order_list = {
    url: `${baseUrl}api/orderList`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};

//公告列表
api.msg_list = {
    url: `${baseUrl}api/life/msgList`,
    method: api.requestType.get,
    intercept: intercept
};
//公告详情
api.msg_info = {
    url: `${baseUrl}api/life/msgDetail`,
    method: api.requestType.get,
    intercept: intercept
};
//广告列表
api.ban_list = {
    url: `${baseUrl}api/life/banList`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//平台列表
api.platform_list = {
    url: `${baseUrl}api/platformList`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};


//detail
api.detail = {
    url: `${baseUrl}api/detail`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//team_list
api.team_list = {
    url: `${baseUrl}api/life/team`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//提现
api.withdraw = {
    url: `${baseUrl}api/add`,
    method: api.requestType.post,
    form: true,
    inject: inject,
    intercept: intercept
};
//提现列表
api.withdraw_list = {
    url: `${baseUrl}api/list`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//我的订单
api.my_order_list = {
    url: `${baseUrl}api/myOrderList`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//交易明细
api.integral_list = {
    url: `${baseUrl}api/txn`,
    method: api.requestType.get,
    inject: inject,
    intercept: intercept
};
//意见反馈
api.comment = {
    url: `${baseUrl}api/life/comment`,
    method: api.requestType.post,
    inject: inject,
    form: true,
    intercept: intercept
};
//系统消息
api.sys_msg = {
    url: `${baseUrl}api/life/msg`,
    method: api.requestType.get,
    inject: inject,
    form: true,
    intercept: intercept
};

export default api;
